<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>constructor应用</title>
</head>
<body>
   <script>
     function Star(){
     }
    //  Star.prototype.sing=function(){
    //      console.log("唱歌")
    //  }
    //  Star.prototype.dance=function(){
    //      console.log("跳舞")
    //  }
    console.log(Star.prototype);
    Star.prototype={
       constructor:Star,
       sing:function(){
          console.log("I can sing")
       },
       dance:function(){
          console.log("I can dance")
       }
    }
    console.log(Star.prototype)
   </script>
</body>
</html>